package com.czh.framework.exception.handler;

import com.czh.common.domain.AjaxRes;
import com.czh.framework.exception.TestException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice({"com.czh.system.controller.test"})
public class ControllerExceptionHandler {

    @ExceptionHandler(TestException.class)
    public AjaxRes handle(TestException e) {
        return AjaxRes.fault(e.getMessage());
    }

}
